package com.sunyard.inser.dto;

import java.io.Serializable;

/**
 * 前后端交互数据标准
 * 
 * 
 * @Date 2018/03/24
 */
public class Result<T> implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 失败消息
	 */
	private String message;

	/**
	 * 返回代码
	 */
	private String code;

	/**
	 * 时间戳
	 */
	private long timestamp = System.currentTimeMillis();

	/**
	 * 结果对象
	 */
	private T result;


	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}



	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public T getResult() {
		return result;
	}

	public void setResult(T result) {
		this.result = result;
	}

	@Override
	public String toString() {
		return "Result [message=" + message + ", code=" + code + ", timestamp=" + timestamp + ", result=" + result
				+ "]";
	}
	
	
}
